package com.vvvtimes.demo.domain.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * DNS解析
 */
@lombok.Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class AliDnsResolveVo implements Serializable {

    private int Status;
    private Boolean TC;
    private Boolean RD;
    private Boolean RA;
    private Boolean AD;
    private Boolean CD;

    //请求段
    private QuestionInfo Question;

    //响应
    private List<AnswerInfo> Answer = new ArrayList<>();

    /**
     * 请求
     */
    @lombok.Data
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class QuestionInfo implements Serializable {
        private String name;
        private String type;
    }


    /**
     * 响应
     */
    @lombok.Data
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class AnswerInfo implements Serializable {
        //兼容字段
        private String name;
        private Integer TTL;
        private Integer type;
        private String data;
    }


}


